/*
 * Copyright(c)  2022 厦门外里科技有限公司 All rights reserved.
 *
 * https://www.wailikeji.com
 *
 * 版权所有，侵权必究！
 */

//vue.config.js
const TransformPages = require('uni-read-pages')
const {webpack} = new TransformPages()
module.exports = {
    configureWebpack: {
        plugins: [
            new webpack.DefinePlugin({
                ROUTES: webpack.DefinePlugin.runtimeValue(() => {
                    const tfPages = new TransformPages({
                        includes: ['path', 'name','aliasPath','meta']
                    });
                    return JSON.stringify(tfPages.routes)
                }, true )
            })
        ]
    }
}
